package com.photo.init;

import com.photo.config.ConstConfig;
import top.hserver.core.interfaces.InitRunner;
import top.hserver.core.ioc.annotation.Bean;

import java.io.File;

@Bean
public class ServerInit implements InitRunner {

    @Override
    public void init(String[] strings) {
        //存储项目的路径不存在就创建一个
        File file = new File(ConstConfig.PHOTO_PATH);
        if (!file.exists()) {
            file.mkdirs();
        }
    }
}
